Tangoe ServiceNow API

(0 reviews)

Case API

The case API allows you to:

  • create a case on Tangoe ServiceNow instance
  • update cases which is not closed at Tangoe side
  • retrieve case details
typeendpoint
POST/api/tango/v1/integrations/casesCreate a case
PATCH/api/tango/v1/integrations/cases/{number}Update a non-closed case
GET/api/tango/v1/integrations/casesRetrieve the list of cases
GET/api/tango/v1/integrations/cases/{number}Retrieve the case by case number
DELETE/api/tango/v1/integrations/cases/{number}Cancel a non-closed case

Create Cases

Creating a case implies registering a case on Tangoe ServiceNow API with valid and required parameters. When valid request body parameters are passed to the API, the Tangoe ServiceNow API system will validate the data and see if calling user has proper access to create the case on its instance. After all validation is completed, a case is registered on Tangoe ServiceNow system and a success message is sent back instantly.

When a case is successfully created, the API returns a result key containing the full response payload, which typically contains keys like id, number, status.

Example Request and Response

Note: - Below are example requests and responses, please use the appropriate base URL.

REQUEST

curl "https://tangoe.service-now.com/api/tango/v1/integrations/cases" \
--request POST \
--header "Accept:application/json" \
--header "Content-Type:application/json" \
--user 'username':'password' \
--data '{case_object}'

sample case_object:

{
  "short_description": "TEST This is a test case short description",
  "description": "TEST This is a test case description",
  "entitlement_id": "7594faefdb9d3f040e08fce9af961964",
  "priority": "3",
  "correlation_id": "UMCCASE12345",
  "correlation_display": "INCxxx12345",
  "contact_email":"john.doe@tangoe.com",
  "additional_contacts": "user.name1@company.com, user.name2@company.com",
  "callback": {
    "callback_url": "https://cust-snow.com/api/customer/callback",
    "callback_type": "POST",
    "callback_auth_type": "basic",
    "callback_auth_user": "username",
    "callback_auth_password": "password"
  }
}

RESPONSE

HTTP/1.1 201 OK
Content-Type: application/json
{
  "result": {
    "id": "9e641634db97c450a813fd651d96194f",
    "number": "CS0618457",
    "status": "inserted"
  }
}

Request Parameters

parametersrequired/optionaldescription
short_descriptionrequiredShort description text, this is a required field
descriptionrequiredDescription text represents detailed description of the issue/case. This is a required field.
entitlement_idoptionalThe entitlement id affects how the case is handled by Tangoe's support staff. A separate API is available to determine the valid values for your organization, and it is critical the correct value be supplied here. Blanks are accepted but may result in significantly slower handling times for your case. Invalid ids will generate exceptions and cause the payload to be rejected. NOTE: - This parameter cannot be updated via API once set.
correlation_idoptionalThis can be used to track any additional case identification at your end, the back-end value set here will be saved as it is and can be retrieved via GET API down the line.
correlation_displayoptionalThis can be used to track any additional case identification at your end, the front-end value set here will be saved as it is and can be retrieved via GET API down the line.
contact_emailoptionalPrimary contact email ID on the case, this has to be a valid email ID at Tangoe side or else default contact email id registered for your account will be populated on the case. NOTE: -This parameter cannot be updated via API once set.
priorityoptionalPriority of the case, It can be one of the following 1, 2, 3, 4, 5. The mapping for the same is given below:
1 - System Outage
2 - Critical
3 - High
4 - Medium
5 - Low
if this parameter is not set, the default priority would be set on the case.
additional_contactsoptionalMultiple comma separated email ID can be set on the case, these contacts would get any notification populated on the case based on the eligibility for your account. NOTE: - This parameter cannot be updated via API once set.
callbackoptionalSet this object to subscribe to update events on the case triggered by Tangoe agents. If this object is set properly, the Tangoe ServiceNow instance will attempt an API callback whenever key fields are updated on the case. The callback payload will contain the relevant case details as shown in the Callback section of this document. If no callback object is set, you can still retrieve case details at any time, but changes will not be pushed to you.

If the callback object is set, then all the below mentioned attributes are mandatory and appropriate value should be set.

callback_url : URL to which the callback should be made.

callback_type : HTTP method need to be used when calling callback_url. example: POST, PUT, PATCH.

callback_auth_type : This can be either basic or no-auth, this should be set to basic if basic authentication is need to be performed while calling the callback_url. We currently support only basic authentication.

callback_auth_user : if callback_auth_type = "basic", set this value with appropriate user name which need to be used while calling the callback_url else set this to empty string.

callback_auth_password : if callback_auth_type = "basic", set this value with appropriate user password which need to be used while calling the callback_url, else set this to empty string.

Response Attributes

attributedescription
idUnique record ID
numberCase number created by Tangoe. This number should always be used to query Tangoe ServiceNow Case GET/UPDATE API's
statusindicates the status of the current request

Modifying Cases

If a case is open or pending in Tangoe ServiceNow system, certain attributes of it can be modified.

It is important to send the appropriate case number when you need to modify the specific case. When a case is successfully updated, the API returns a result key containing the full response payload, which typically contains keys like id, number, status.

Example Request and Response

Note: - Below are example requests and responses, please use the appropriate base URL

REQUEST

curl "https://tangoe.service-now.com/api/tango/v1/integrations/cases/{number}" \
--request PATCH \
--header "Accept:application/json" \
--header "Content-Type:application/json" \
--user 'username':'password' \
--data '{case_update_object}'

sample case_update_object:

{
  "description": "TEST:This is a test case and updated on dd-mm-yyyy hh:mm",
  "priority": "2",
  "correlation_id": "UMCCASE12345-1",
  "correlation_display": "INCxxx12345",
  "callback": {
    "callback_url": "https://cust-snow.com/api/customer/callback",
    "callback_type": "PUT",
    "callback_auth_type": "basic",
    "callback_auth_user": "username",
    "callback_auth_password": "updated-password"
  }
}

RESPONSE

HTTP/1.1 200 OK
Content-Type: application/json
{
  "result": {
    "id": "9e641634db97c450a813fd651d96194f",
    "number": "CS0618457",
    "status": "updated"
  }
}

Note: - At least one of the below parameters should be set in the request body to update the case appropriately. If none of the below parameters need to be updated on the Tangoe side of the case, please do not request this API.

Request Parameters

parametersrequired/optionaldescription
short_descriptionrequiredShort description text, this is a required field
descriptionrequiredDescription text represents detailed description of the issue/case. This is a required field.
entitlement_idoptionalThe entitlement id affects how the case is handled by Tangoe's support staff. A separate API is available to determine the valid values for your organization, and it is critical the correct value be supplied here. Blanks are accepted but may result in significantly slower handling times for your case. Invalid ids will generate exceptions and cause the payload to be rejected. NOTE: - This parameter cannot be updated via API once set.
correlation_idoptionalThis can be used to track any additional case identification at your end, the back-end value set here will be saved as it is and can be retrieved via GET API down the line.
correlation_displayoptionalThis can be used to track any additional case identification at your end, the front-end value set here will be saved as it is and can be retrieved via GET API down the line.
contact_emailoptionalPrimary contact email ID on the case, this has to be a valid email ID at Tangoe side or else default contact email id registered for your account will be populated on the case. NOTE: -This parameter cannot be updated via API once set.
priorityoptionalPriority of the case, It can be one of the following 1, 2, 3, 4, 5. The mapping for the same is given below:
1 - System Outage
2 - Critical
3 - High
4 - Medium
5 - Low
if this parameter is not set, the default priority would be set on the case.
additional_contactsoptionalMultiple comma-separated email ID can be set on the case, these contacts would get any notification populated on the case based on the eligibility for your account. NOTE: - This parameter cannot be updated via API once set.
callbackoptionalSet this object to subscribe to update events on the case triggered by Tangoe agents. If this object is set properly, the Tangoe ServiceNow instance will attempt an API callback whenever key fields are updated on the case. The callback payload will contain the relevant case details as shown in the Callback section of this document. If no callback object is set, you can still retrieve case details at any time, but changes will not be pushed to you.

If the callback object is set, then all the below-mentioned attributes are mandatory and appropriate value should be set.

callback_url : URL to which the callback should be made.

callback_type : HTTP method need to be used when calling callback_url. example: POST, PUT, PATCH.

callback_auth_type : This can be either basic or no-auth, this should be set to basic if basic authentication is need to be performed while calling the callback_url. We currently support only basic authentication.

callback_auth_user : if callback_auth_type = "basic", set this value with appropriate user name which need to be used while calling the callback_url else set this to empty string.

callback_auth_password : if callback_auth_type = "basic", set this value with appropriate user password which need to be used while calling the callback_url, else set this to empty string.

Response Attributes

attributedescription
idUnique record ID
numberCase number created by Tangoe. This number should always be used to query Tangoe ServiceNow Case GET/UPDATE API's
statusindicates the status of the current request

Retrieving Cases

Cases from Tangoe ServiceNow can be retrieved individually by passing the case number as an attribute or in bulk using query parameters. Once the cases are created in the system, irrespective of its status, it can be queried and retrieved using the GET API.

Query Parameters

parameterrequired/optionaldescription
limitoptionalThe maximum number of results returned per page (default: 10)
offsetoptionalOffset option specifies the number of items in the queried collection to be skip
include_commentsoptionalSet this flag to “true” if "comments" array is needed in the response, Default(false)

|sysparm_query |optional |Optional Query can be passed to filter the records appropriately. See sysparm_query section for additional details |

Response Attributes

attributedescription
numbercase number created by Tangoe
idunique record ID
statecurrent state of the case in Tangoe ServiceNow system. It can be one of the following 1, 3, 5, 6, 7, 10, -5, -10.The mapping for the same is given below :
1 - New
3 - Closed
5 - Assigned
6 - Complete/Resolved
7 - Cancelled
10 - Work In Progress
-5 - On Hold
-10 - Reassigned
prioritypriority of the case, It can be one of the following 1, 2, 3, 4, 5. The mapping for the same is given below:
1 - System Outage
2 - Critical
3 - High
4 - Medium
5 - Low
short_descriptionshort description text
descriptiondescription text represents a detailed description of the issue/case.
correlation_idcorrelation id set by API consumer via Create or Update API request
correlation_displaycorrelation display set by API consumer via Create or Update API request
contact_emailprimary contact email ID on the case
created_oncase creation date
updated_oncase last update on
close_codecase close code set by the Tangoe support agent while resolving the case
close_notescase close notes set by the Tangoe support agent while resolving the case
completion_date_timecase completion date time
resolved_atcase resolution date time
Example Request and Response

Note: - Below are example requests and responses, please use the appropriate base URL.

REQUEST 1 - Retrieve case by case number

curl "https://tangoe.service-now.com/api/tango/v1/integrations/cases/{number}" \
--request GET \
--header "Accept:application/json" \
--user 'username':'password'

RESPONSE

HTTP/1.1 200 OK
Content-Type: application/json
{
  "result": {
    "number": "CS0618457",
    "id": "9e641634db97c450a813fd651d96194f",
    "state": "3",
    "priority": "3",
    "short_description": "TEST :- This is a test ticket",
    "description": "TEST :- This is a test ticket updated on 29Feb2020",
    "correlation_id": "",
    "correlation_display": "",
    "contact_email": "DoNotReply@Tangoe.com",
    "created_on": "2020-02-28 19:06:23",
    "updated_on": "2020-02-28 20:20:15",
    "close_code": "Closed Normal",
    "close_notes": "completed the task",
    "completion_date_time": "2020-02-28 20:19:01",
    "resolved_at": "2020-02-28 20:19:01"
  }
}

REQUEST 2 - Retrieve first 20 cases

curl "https://tangoe.service- now.com/api/tango/v1/integrations/cases?limit=20=0" \
--request GET \
--header "Accept:application/json" \
--user 'username':'password'

RESPONSE

HTTP/1.1 200 OK
Content-Type: application/json
{
  "result": [ {
    "number": "CS0618465",
    "id": "d194729ddb174850a813fd651d9619db",
    "state": "1",
    "priority": "2",
    "short_description": "TEST :- This is a test ticket",
    "description": "TEST :- This is a test ticket and updated on 03 IST ",
    "correlation_id": "UMCCASE12345-1",
    "correlation_display": "INCxxx12345",
    "contact_email": "DoNotReply@Tangoe.com",
    "created_on": "2020-03-01 10:43:55",
    "updated_on": "2020-03-01 16:59:31",
    "close_code": "",
    "close_notes": "",
    "completion_date_time": "",
    "resolved_at": ""
  },
  {
    "number": "CS0618457",
    "id": "9e641634db97c450a813fd651d96194f",
    "state": "3",
    "priority": "3",
    "short_description": "TEST This is a test ticket",
    "description": "TEST This is a test ticket updated on 29Feb2020",
    "correlation_id": "",
    "correlation_display": "",
    "contact_email": "DoNotReply@Tangoe.com",
    "created_on": "2020-02-28 19:06:23",
    "updated_on": "2020-02-28 20:20:15",
    "close_code": "Closed Normal",
    "close_notes": "completed the task",
    "completion_date_time": "2020-02-28 20:19:01",
    "resolved_at": "2020-02-28 20:19:01"
  },
  {...} // record skipped for readability purposes ]
}

REQUEST 3 - Retrieve case with comments

curl "https://tangoe.service-now.com/api/tango/v1/integrations/cases /CS0618457?include_comments=true" \
--request GET \
--header "Accept:application/json" \
--user 'username':'password'

RESPONSE

HTTP/1.1 200 OK
Content-Type: application/json
{
  "result": {
    "number": "CS0618457",
    "id": "9e641634db97c450a813fd651d96194f",
    "state": "3",
    "priority": "3",
    "short_description": "TEST :- This is a test ticket",
    "description": "TEST :- This is a test ticket updated on 29Feb2020",
    "correlation_id": "",
    "correlation_display": "",
    "contact_email": "DoNotReply@Tangoe.com",
    "comments": [
      {
        "id": "aa15a234dbd7c450a813fd651d961998",
        "comment": "some comment value again",
        "created_on": "2020-02-28 20:19:18",
        "created_by": "john.dow@tangoe.com"
      },
      {
        "id": "a9646af0dbd7c450a813fd651d9619e0",
        "comment": "some comment value later",
        "created_on": "2020-02-28 20:16:14",
        "created_by": "john.dow@tangoe.com"
      },
      {
        "id": "4a2466f0dbd7c450a813fd651d96195c",
        "comment": "some comment value now",
        "created_on": "2020-02-28 20:15:11",
        "created_by": "steve.dow@tangoe.com"
      }
    ],
    "created_on": "2020-02-28 19:06:23",
    "updated_on": "2020-02-28 20:20:15",
    "close_code": "Closed Normal",
    "close_notes": "completed the task",
    "completion_date_time": "2020-02-28 20:19:01",
    "resolved_at": "2020-02-28 20:19:01"
  }
}

REQUEST 4 - Retrieve cases created after a particular date using a standard ServiceNow encoded query string in the sysparm_query parameter

Info - query used: - sysparm_query=sys_created_onRELATIVEGE@minute@ago@45
Note: - Javascript cannot be used to query the records, all javascript query string within the Queryparams will be ignored.

curl "https://tangoe.service-now.com/api/tango/v1/integrations/cases? limit=2&offset=0&sysparm_query=sys_created_onRELATIVEGE@minute@ago@45" \
--request GET \
--header "Accept:application/json" \
--user 'username':'password'

RESPONSE

HTTP/1.1 200 OK
Content-Type: application/json
{
  "result": [
    {
      "number": "CS0618465",
      "id": "d194729ddb174850a813fd651d9619db",
      "state": "1",
      "priority": "2",
      "short_description": "TEST :- This is a test ticket",
      "description": "TEST :- This is a test ticket and updated on 03-Mar-
2020 9:53 PM IST ",
      "correlation_id": "UMCCASE12345-1",
      "correlation_display": "INCxxx12345",
      "contact_email": "DoNotReply@Tangoe.com",
      "created_on": "2020-03-01 10:43:55",
      "updated_on": "2020-03-01 16:59:31",
      "close_code": "",
      "close_notes": "",
      "completion_date_time": "",
      "resolved_at": ""
    },
    {

      "number": "CS0618457",
      "id": "9e641634db97c450a813fd651d96194f",
      "state": "3",
      "priority": "3",
      "short_description": "TEST :- This is a test ticket",
      "description": "TEST :- This is a test ticket updated on 29Feb2020",
      "correlation_id": "",
      "correlation_display": "",
      "contact_email": "DoNotReply@Tangoe.com",
      "created_on": "2020-02-28 19:06:23",
      "updated_on": "2020-02-28 20:20:15",
      "close_code": "Closed Normal",
      "close_notes": "completed the task",
      "completion_date_time": "2020-02-28 20:19:01",
      "resolved_at": "2020-02-28 20:19:01"
    }
  ]
}

Cancel a Case

As long as a case remains open (in Open or any of the other pending states in the system), it can be canceled.

Query Parameters

parameterrequired/optionaldescription
cancel_typerequiredIt should be either in 1 or 2, this value governs how the cancel request need to be handled, mapping for both the values are given below.

1 = Cancelled
2 = Closed Out of Scope

Response Attributes

attributedescription
idUnique record ID
numberCase number created by Tangoe. This number should always be used to query Tangoe ServiceNow Case GET/UPDATE API's
statusindicates the status of the current request
Example Request and Response

Note: - Below are example requests and responses, please use the appropriate base URL.

REQUEST

curl "https://tangoe.service-now.com/api/tango/v1/integrations/cases/CS0665791" \
--request DELETE \
--header "Accept:application/json" \
--user 'username':'password'

RESPONSE

HTTP/1.1 200 OK
Content-Type: application/json
{
  "result": {
    "id": "6abb8cd1dbd51810d80b5a58dc961900",
    "number": "CS0665791",
    "status": "updated"
  }
}

Reviews